package com.ruoyi.cms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cms.mapper.CrmMeetReserveMapper;
import com.ruoyi.cms.domain.CrmMeetReserve;
import com.ruoyi.cms.service.ICrmMeetReserveService;

/**
 * 会议预约Service业务层处理
 * 
 * @author hct
 * @date 2022-10-06
 */
@Service
public class CrmMeetReserveServiceImpl implements ICrmMeetReserveService 
{
    @Autowired
    private CrmMeetReserveMapper crmMeetReserveMapper;

    /**
     * 查询会议预约
     * 
     * @param id 会议预约主键
     * @return 会议预约
     */
    @Override
    public CrmMeetReserve selectCrmMeetReserveById(Long id)
    {
        return crmMeetReserveMapper.selectCrmMeetReserveById(id);
    }

    /**
     * 查询会议预约列表
     * 
     * @param crmMeetReserve 会议预约
     * @return 会议预约
     */
    @Override
    public List<CrmMeetReserve> selectCrmMeetReserveList(CrmMeetReserve crmMeetReserve)
    {
        return crmMeetReserveMapper.selectCrmMeetReserveList(crmMeetReserve);
    }
    @Override
    public List<CrmMeetReserve> getList(Long meetId,String day){
        return crmMeetReserveMapper.findByMeetIdAndStartTime(meetId,day);

    }


    /**
     * 新增会议预约
     * 
     * @param crmMeetReserve 会议预约
     * @return 结果
     */
    @Override
    public int insertCrmMeetReserve(CrmMeetReserve crmMeetReserve)
    {
        return crmMeetReserveMapper.insertCrmMeetReserve(crmMeetReserve);
    }

    /**
     * 修改会议预约
     * 
     * @param crmMeetReserve 会议预约
     * @return 结果
     */
    @Override
    public int updateCrmMeetReserve(CrmMeetReserve crmMeetReserve)
    {
        return crmMeetReserveMapper.updateCrmMeetReserve(crmMeetReserve);
    }

    /**
     * 批量删除会议预约
     * 
     * @param ids 需要删除的会议预约主键
     * @return 结果
     */
    @Override
    public int deleteCrmMeetReserveByIds(Long[] ids)
    {
        return crmMeetReserveMapper.deleteCrmMeetReserveByIds(ids);
    }

    /**
     * 删除会议预约信息
     * 
     * @param id 会议预约主键
     * @return 结果
     */
    @Override
    public int deleteCrmMeetReserveById(Long id)
    {
        return crmMeetReserveMapper.deleteCrmMeetReserveById(id);
    }
}
